<!doctype html>
<html>
	<head>
		<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta charset="utf-8">
		<link rel="stylesheet" href="{MODULE_URL}resource/css/style.css" />
		{if $color!=""}
		<link rel="stylesheet" href="{MODULE_URL}resource/css/{$color}.css" />
		{/if}
		<script type="text/javascript" src="{MODULE_URL}resource/js/jquery-2.1.4.min.js"></script>
		<title>排行榜</title>
		{php echo register_jssdk();}
	</head>

	<body style="background: #fff;">
		<div class="rank" style="background:#CD853F;">
			<div class="pic">
				<img src="{$phbimg}" width="100%">
			</div>
			<div class="countdown">
				<div class="con" id="con"></div>
			</div>
			
		</div>
		
		<div class="rankList">
			<ul id="playhtml">
			<?php $i=1; ?>
			{loop $userlist $row}
				{if $i<=$phbnum}
				<li>
					<img src="{$row['headimg']}" width="50">
					<p class="p1">{$row['nick']}</p>
					<p><span>现金宝藏：<i>{$row['sum_points']}</i></span><span>完成次数：<i>{$row['count_poins']}</i></span></p>
					<div class="count">{$i}</div>
				</li>
				<?php $i++; ?>
				{/if}
			{/loop}
			</ul>
			
			
			
		</div>
		
		
	</body>
<script type="text/javascript"> 
$(function(){
	$("#qyt").click(function(){
		$("#qyt").attr("class","active");
		$("#phb").attr("class","");
		$("#helphtml").show();
		$("#playhtml").hide();
	})
	$("#phb").click(function(){
		$("#phb").attr("class","active");
		$("#qyt").attr("class","");
		$("#helphtml").hide();
		$("#playhtml").show();
	})
	//分享
	wx.ready(function(){
	   sharedata = {
	       title: "{$sharetitle} ",
	       desc: "{$sharecontent}",
	       link: "{$sharelink}",
	       imgUrl: "{$shareimg}"
		}; 
		wx.onMenuShareAppMessage(sharedata);//分享给朋友
		wx.onMenuShareTimeline(sharedata);//分享到朋友圈
		wx.showOptionMenu();//显示右上角按钮
	});
	<!-- var ljstatus={$ljstatus}; -->
	<!-- var points={$points}; -->
	<!-- var isjl={$isjl}; -->
	<!-- var jltype={$jltype}; -->
	<!-- var jlnum={$jlnum}; -->
	<!-- if(isjl==1){ -->
		<!-- if(ljstatus==0 || ljstatus==""){ -->
			<!-- if(jltype==0){ -->
				<!-- //$("#jldiv").show(); -->
			<!-- }else{ -->
				<!-- if(points>=jlnum){ -->
					<!-- $("#jldiv").show(); -->
				<!-- } -->
			<!-- } -->
		<!-- } -->
	<!-- } -->
})
function hexiao(){
	var hxnum=$("#hxnum").val();
	var url="{php echo $this->createMobileUrl('hexiao',array('id'=>$id,'rid'=>$rid))}&hxnum="+hxnum;
	$.post(url, {},function(data){
			if(data.success==1){
				$("#hxdiv").hide();
				$("#hxres").show();
			}else{
				$("#errortxt").html(data.msg);
			}
   	},"json");
}
var interval = 1000; 
var leftsecond={$leftsecond};
if(leftsecond<=0){
	$("#con").html("活动已结束"); 
}else{
	window.setInterval(function(){ShowCountDown('daojishi');}, interval); 
	function ShowCountDown(divname) 
	{ 
		leftsecond--;
		var day=Math.floor(leftsecond/(60*60*24)); 
		var hour=Math.floor((leftsecond-day*24*60*60)/3600); 
		var minute=Math.floor((leftsecond-day*24*60*60-hour*3600)/60); 
		var second=Math.floor(leftsecond-day*24*60*60-hour*3600-minute*60); 
		$("#con").html("活动剩余时间：<i>"+day+"</i>天<i>"+hour+"</i>小时<i>"+minute+"</i>分<i>"+second+"</i>秒"); 
	} 
}
</script> 
</html>